package bTree.LeetCode;

public class 最长连续递增序列 {
    public int findLengthOfLCIS(int[] nums) {
        if (nums.length == 1) {
            return 1;
        }
        int max = 1;
        int path = 1;
        for (int i = 1; i < nums.length; i++) {
            if (nums[i] > nums[i - 1]) {
                path++;
            } else {
                if (path > max) {
                    max = path;
                }
                path = 1;
            }
        }
        if (path > max) {
            max = path;
        }
        return max;
    }
}
